package com.xcity.pomelo.response;

import java.util.ArrayList;
import java.util.List;

import com.xcity.db.entity.Player;

import naga.x.net.impl.pomelo.PomeloMessage;
import naga.x.net.impl.pomelo.protocol.Message;

@PomeloMessage(type = Message.Type.RESPONSE)
public class OppositeSexPlayerResponse extends Response {

	private List<SimplePlayer> rolers;
	
	public static class SimplePlayer {
		private long roleId;
		private String roleName;
		private String img;
		private int lv;
		private byte sex;
		public long getRoleId() {
			return roleId;
		}
		public void setRoleId(long roleId) {
			this.roleId = roleId;
		}
		public String getRoleName() {
			return roleName;
		}
		public void setRoleName(String roleName) {
			this.roleName = roleName;
		}
		public String getImg() {
			return img;
		}
		public void setImg(String img) {
			this.img = img;
		}
		public int getLv() {
			return lv;
		}
		public void setLv(int lv) {
			this.lv = lv;
		}
		public byte getSex() {
			return sex;
		}
		public void setSex(byte sex) {
			this.sex = sex;
		}
	}
	
	public OppositeSexPlayerResponse(int serial, List<Player> srcs) {
		super(serial);
		rolers = new ArrayList<SimplePlayer>(srcs.size());
		for (int i = 0; i < srcs.size(); i++) {
			Player src = srcs.get(i);
			SimplePlayer p = new SimplePlayer();
			p.roleId = src.getId();
			p.roleName = src.getName();
			p.img = src.getIcon();
			p.lv = src.getLevel();
			p.sex = src.getSex();
			rolers.add(p);
		}
	}

	public List<SimplePlayer> getRolers() {
		return rolers;
	}

	public void setRolers(List<SimplePlayer> rolers) {
		this.rolers = rolers;
	}

}
